package com.neusoft.mms.controller;

import com.neusoft.mms.service.UserService;


public class LoginAction{
	private String username;
	private String password;
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	
	private UserService userService;
	public void setUserService(UserService userService) {
		this.userService = userService;
	}
	public String execute(){
		String result = "error";
		boolean isSuccess = userService.login(username, password);
		if(isSuccess){
			result = "success";
		}
		return result;
	}
	

}
